home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / nnans193.zip / DRIVERS.INC < prev    next >
Text File  |  1993-01-15  |  11KB  |  423 lines

  1. ; display specific definitions follow. You will need to add to these to 
  2. ; configure for unsupported display controllers.
  3.  
  4.      ; default generic graphics. USE THESE AS "TEMPLATES"
  5. gmode_test macro isgraphic
  6.     ; This macro is to jump if display is in an EGA/VGA 16 color 
  7.     ; "compatible" mode -- this means one which is a simple extension
  8.     ; (more rows and/or columns) than modes 10h or 12h. At minimum
  9.     ; modes 10h and 12h themselves qualify.
  10.     ; No registers may be altered.
  11.     ; Byte location "cs:video_mode" is a copy of byte 40:49H.
  12.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  13.     je    isgraphic
  14.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  15.     je    isgraphic
  16. endm
  17. gmode_code macro
  18.     ; this macro is used to tell if display is in graphics
  19.     ; mode by looking at the byte 40:49H, which is in
  20.     ; register AL at the start of the macro.
  21.     ; It is to set location cs:gmode_flag non-zero if in a graphics mode.
  22.     ; Value of 7 is reserved for the monochrome adapter.
  23.     ; No registers may be altered.
  24.     ; *NOTE* users of Paradise and possibly other VGA
  25.     ; cards will need to modifify this routine because
  26.     ; Paradise extended character modes set this byte to
  27.     ; to the value of the mode you selected.  Nicer cards
  28.     ; (Genoa and VEGA, that I know of) leave this byte at
  29.     ; "3" and all works fine!
  30.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  31.     cmp    al, 4
  32.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  33.     mov    cs:gmode_flag,al    ; non-zero value
  34. not_graphics:
  35. endm
  36.  
  37. IF PARA480
  38. ; From Arend van den Brug
  39. card_id    macro
  40.     db    'Paradise EGA 480'
  41. endm
  42.  
  43. gmode_test macro isgraphic
  44.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  45.     je    isgraphic
  46.     cmp    cs:video_mode, 50h    ; 640x480, 16 color EGA mode
  47.     je    isgraphic
  48. endm
  49. gmode_code macro
  50.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  51.     cmp    al, 4
  52.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  53.     cmp    al, 51h            ; 51: 80x30 text 16 colors 
  54.     je    not_graphics
  55.     cmp    al, 54h            ; 54: 132x43 text 16 colors 
  56.     je    not_graphics
  57.     cmp    al, 55h            ; 55: 132x25 text 16 colors 
  58.     je    not_graphics
  59.     mov    cs:gmode_flag,al    ; non-zero value
  60. not_graphics:
  61. endm
  62. ENDIF
  63.  
  64. IF PARADISE
  65. card_id macro
  66.     db    'Paradise VGA'
  67. endm
  68. gmode_test macro isgraphic
  69.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  70.     je    isgraphic
  71.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  72.     je    isgraphic
  73.     cmp    cs:video_mode, 58h    ; 800x600, 16 color
  74.     je    isgraphic
  75. endm
  76. gmode_code macro
  77.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  78.     cmp    al, 4
  79.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  80.     cmp    al, 54h            ; modes 54 and 55 are text!
  81.     je    not_graphics
  82.     cmp    al, 55h
  83.     je    not_graphics
  84.     mov    cs:gmode_flag,al    ; non-zero value
  85. not_graphics:
  86. endm
  87. ENDIF
  88.  
  89. IF TSENG4000
  90. BAD_ERASE = TRUE            ; can't erase the display properly
  91. card_id    macro
  92.     db    'TSENG LABS 4000'
  93. endm
  94.  
  95. gmode_test macro isgraphic
  96.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  97.     je    isgraphic
  98.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  99.     je    isgraphic
  100.     cmp    cs:video_mode, 29h    ; 800x600, 16 color
  101.     je    isgraphic
  102. endm
  103. gmode_code macro
  104.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  105.     cmp    al, 4
  106.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  107.     cmp    al, 21h            ; 132x60, 44, 25, 28
  108.     jb    is_graphics
  109.     cmp    al, 24h
  110.     jbe    not_graphics
  111.     cmp    al, 26h            ; 80x60
  112.     je    not_graphics
  113.     cmp    al, 2Ah            ; 100x40
  114.     je    not_graphics
  115. is_graphics:
  116.     mov    cs:gmode_flag,al    ; non-zero value
  117. not_graphics:
  118. endm
  119. ENDIF
  120.  
  121.  
  122. IF ATT600
  123. card_id macro
  124.     db    'AT&T VDC600'
  125. endm
  126. gmode_test macro isgraphic
  127.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  128.     je    isgraphic
  129.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  130.     je    isgraphic
  131.     cmp    cs:video_mode, 47h    ; 800x600, 16 color
  132.     je    isgraphic
  133. endm
  134. gmode_code macro
  135.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  136.     cmp    al, 4
  137.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  138.     cmp    al, 54h            ; modes 54 and 55 are text!
  139.     je    not_graphics
  140.     cmp    al, 55h
  141.     je    not_graphics
  142.     mov    cs:gmode_flag,al    ; non-zero value
  143. not_graphics:
  144. endm
  145. ENDIF
  146.  
  147. IF STBVGA
  148. card_id    macro
  149.     db    'STB VGA Extra'
  150. endm
  151. gmode_test macro isgraphic
  152.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  153.     je    isgraphic
  154.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  155.     je    isgraphic
  156. endm
  157. gmode_code macro
  158.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  159.     cmp    al, 4
  160.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  161.     cmp    al, 22h            ; modes 22 and 23 are text!
  162.     je    not_graphics
  163.     cmp    al, 23h
  164.     je    not_graphics
  165.     mov    cs:gmode_flag,al    ; non-zero value
  166. not_graphics:
  167. endm
  168. ENDIF
  169.  
  170. IF TVGA16
  171. card_id    macro
  172.     db    'Tatung VGA-16'
  173. endm
  174. gmode_test macro isgraphic
  175.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  176.     je    isgraphic
  177.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  178.     je    isgraphic
  179. endm
  180. gmode_code macro
  181.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  182.     cmp    al, 4
  183.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  184.     cmp    al, 56h            ; modes 56 and 57 are text!
  185.     jb    not_graphics
  186.     cmp    al, 57h
  187.     jb    not_graphics
  188.     mov    cs:gmode_flag,al    ; non-zero value
  189. not_graphics:
  190. endm
  191. ENDIF
  192.  
  193.  
  194. IF    VEGA
  195. card_id    macro
  196.     db    'Video-Seven/Headland VGA'
  197. endm
  198. gmode_test macro isgraphic
  199.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  200.     je    isgraphic
  201.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  202.     je    isgraphic
  203.     cmp    cs:video_mode, 14h    ; 752x410
  204.     je    isgraphic
  205.     cmp    cs:video_mode, 15h    ; 720x540
  206.     je    isgraphic
  207.     cmp    cs:video_mode, 16h    ; 800x600
  208.     je    isgraphic
  209. endm
  210. gmode_code macro
  211.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  212.     cmp    al, 4
  213.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  214.     mov    cs:gmode_flag,al    ; non-zero value
  215. not_graphics:
  216. endm
  217. ENDIF
  218.  
  219.  
  220. IF    EGAWIZ
  221. card_id    macro
  222.     db    'EGA Wizard Deluxe'
  223. endm
  224. gmode_test macro isgraphic
  225.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  226.     je    isgraphic
  227.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  228.     je    isgraphic
  229.     cmp    cs:video_mode, 26h    ; 640x480, 60 line
  230.     je    isgraphic
  231.     cmp    cs:video_mode, 70h    ; 740x396
  232.     je    isgraphic
  233.     cmp    cs:video_mode, 71h    ; 800x600
  234.     je    isgraphic
  235. endm
  236. gmode_code macro
  237.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  238.     cmp    al, 4
  239.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  240.     cmp    al, 22h            ; 22-24 are nongraphic
  241.     jb    is_graphics
  242.     cmp    al, 24h
  243.     jbe    not_graphics
  244.     cmp    al, 32h            ; 32-34 are nongraphic
  245.     jb    is_graphics
  246.     cmp    al, 34h
  247.     jbe    not_graphics
  248.     cmp    al, 38h            ; 38 is nongraphic
  249.     je    not_graphics
  250. is_graphics:
  251.     mov    cs:gmode_flag,al    ; non-zero value
  252. not_graphics:
  253. endm
  254. ENDIF
  255.  
  256. IF TridentVGA
  257. card_id    macro
  258.     db    'Trident VGA'
  259. endm
  260. ; contributed by Nadav Horesh  CFNADAV%WEIZMANN.BITNET@CUNYVM.CUNY.EDU
  261. gmode_test macro isgraphic
  262.         cmp     cs:video_mode, 10h      ; 640x350, 16 color mode
  263.         je      isgraphic
  264.         cmp     cs:video_mode, 12h      ; 640x480, 16 color VGA mode
  265.         je      isgraphic
  266.         cmp     cs:video_mode, 5bh      ; 800x600, 16 color TVGA mode
  267.         je      isgraphic
  268.         cmp     cs:video_mode, 5fH      ; 1024x768 16 color TVGA mode
  269.         jnb     isgraphic
  270. endm
  271. gmode_code macro
  272.         mov     cs:gmode_flag,0         ; assume character mode (zero flag)
  273.         cmp     al, 4
  274.         jb      not_graphics            ; modes >=4 are assumed to be graphic
  275.         cmp     al, 050H
  276.         jb      is_graphics
  277.         cmp     al, 5Bh
  278.         jb      not_graphics
  279. is_graphics:
  280.     mov     cs:gmode_flag,al        ; non-zero value
  281. not_graphics:
  282. endm
  283. ENDIF
  284.  
  285. IF MAGICVGA
  286. ; Contributed by:
  287.  
  288.  
  289.  
  290. ;In-Real-Life: Andrew A. Chernov  |  Domain: ache@hq.demos.su,
  291. ;Zodiac-Sign:  Virgo              |          ache%hq.demos.su@relay.eu.net
  292. ;Organization: DEMOS Coop.,       |  Phone:  +7 095 2312129
  293. ;              Moscow, Russia     |  Fax:    +7 095 2335016
  294.  
  295. card_id    macro
  296.     db    'Magic VGA'
  297. endm
  298. gmode_test macro isgraphic
  299.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  300.     je    isgraphic
  301.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  302.     je    isgraphic
  303.     cmp    cs:video_mode, 63h    ; 720x540, 16 color
  304.     je    isgraphic
  305.     cmp    cs:video_mode, 64h    ; 800x600, 16 color
  306.     je    isgraphic
  307. endm
  308. gmode_code macro
  309.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  310.     cmp    al, 4
  311.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  312.     cmp    al, 40h         ; modes 40-43 are text!
  313.     je    not_graphics
  314.     cmp    al, 41h
  315.     je    not_graphics
  316.     cmp    al, 42h
  317.     je    not_graphics
  318.     cmp    al, 43h
  319.     je    not_graphics
  320.     cmp    al, 50h         ; modes 50-53 are text!
  321.     je    not_graphics
  322.     cmp    al, 51h
  323.     je    not_graphics
  324.     cmp    al, 52h
  325.     je    not_graphics
  326.     cmp    al, 53h
  327.     je    not_graphics
  328.     mov    cs:gmode_flag,al    ; non-zero value
  329. not_graphics:
  330. endm
  331. ENDIF
  332. IF    CHIPS
  333. ; From Arend van den Brug
  334. card_id    macro
  335.     db    'Chips SVGA'
  336. endm
  337.  
  338. gmode_test macro isgraphic
  339.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  340.     je    isgraphic
  341.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  342.     je    isgraphic
  343.     cmp    cs:video_mode, 6Ah    ; 800x600, 16 color
  344.     je    isgraphic
  345.     cmp    cs:video_mode, 70h    ; 800x600, 16 color
  346.     je    isgraphic
  347. endm
  348. gmode_code macro
  349.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  350.     cmp    al, 4
  351.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  352.     cmp    al, 60h            ; 60: 132x25 text 16 colors (char 8x14)
  353.     jb    is_graphics        ; 61: 132x50 text 16 colors (char 8x8)
  354.     cmp    al, 62h            ; 62: 132x43 text 16 colors (char 8x8)
  355.     jbe    not_graphics
  356.     cmp    al, 64h            ; 80x43 text 16 colors (char 9x8)
  357.     je    not_graphics
  358.     cmp    al, 65h            ; 80x50 text 16 colors (char 9x8)
  359.     je    not_graphics
  360. is_graphics:
  361.     mov    cs:gmode_flag,al    ; non-zero value
  362. not_graphics:
  363. endm
  364. ENDIF
  365.  
  366.  
  367. IF ATI
  368. ; Contributed by Yaron Keren 
  369.  
  370. card_id    macro
  371.     db  'VGAWonder'
  372. endm
  373.  
  374. gmode_test macro isgraphic
  375.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  376.     je    isgraphic
  377.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  378.     je    isgraphic
  379.     cmp     cs:video_mode, 53h      ; 800x560, 16 color
  380.     je    isgraphic
  381.     cmp     cs:video_mode, 54h      ; 800x600, 16 color
  382.     je      isgraphic
  383. endm
  384. gmode_code macro
  385.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  386.     cmp    al, 4
  387.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  388.     cmp     al, 23h                 ; 132x25
  389.     je     not_graphics
  390.     cmp     al, 33h            ; 132x44
  391.     je    not_graphics
  392.     mov    cs:gmode_flag,al    ; non-zero value
  393. not_graphics:
  394. endm
  395. ENDIF
  396.  
  397.  
  398. IF FAHREN1280
  399. card_id macro
  400.     db    '1280',248,'F'
  401. endm
  402. gmode_test macro isgraphic
  403.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  404.     je    isgraphic
  405.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  406.     je    isgraphic
  407.     cmp    cs:video_mode, 6Ah    ; 800x600, 16 color
  408.     je    isgraphic
  409. endm
  410. gmode_code macro
  411.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  412.     cmp    al, 4
  413.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  414.     cmp    al, 54h            ; 132x43 text
  415.     je    not_graphics
  416.     cmp    al, 55h            ; 132x25 text
  417.     je    not_graphics
  418.     mov    cs:gmode_flag,al    ; non-zero value
  419. not_graphics:
  420. endm
  421. ENDIF
  422.  
  423.